47 m_rots.resize( a_num_crops );
50 for (
int i=0; i<a_num_crops; i++) {
57 sprintf( filename,
"%sFarmType_%d.rot",
61 inpfile = fopen(filename,
"r" );
64 " Unable to open file ", filename);
67 for (
int j=0; j<a_num_crops; j++) {
68 fscanf( inpfile,
"%d", (
int*)&(
m_rots[ j ]->CropNum[ i ]) );
69 for (
int k=0; k<4; k++) {
70 fscanf( inpfile,
"%d", (
int*)&
m_rots[ j ]->NewCrop[ i ][ k ] );
71 fscanf( inpfile,
"%d", &
m_rots[ j ]->Percent[ i ][ k ] );
76 sprintf( filename,
"FarmType_%d.stt", i );
78 inpfile = fopen(filename,
"r" );
81 " Unable to open file ", filename);
84 for (
int j=0; j<a_num_crops; j++) {
85 fscanf( inpfile,
"%d %d",
86 (
int*)&
m_start[ j ]->CropNum[ i ],
const char * value(void)
Definition: configurator.h:152
vector< Starter * > m_start
Definition: croprotation.h:55
vector< Rotation * > m_rots
Definition: croprotation.h:54
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
CfgStr l_map_rotation_files_prefix("MAP_ROTATION_FILES_PREFIX", CFG_CUSTOM, "")
const int NoFarmTypes
Definition: croprotation.h:37
class MapErrorMsg * g_msg
This pointer provides access the to the internal ALMaSS error message system.
Definition: maperrormsg.cpp:41
@ WARN_FILE
Definition: maperrormsg.h:37
Definition: croprotation.h:40
Definition: croprotation.h:47